package dao.impl;

import dao.BaseDao;
import dao.MemoTypeDao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class MemoTypeDaoImpl extends BaseDao implements MemoTypeDao {
    Connection conn;
    PreparedStatement pstmt;
    ResultSet rs;
    @Override
    public ResultSet selectMemoTypes(int uid) {
        conn = getConnection();
        String sql = "select * from memotype where uid = ?";
        try {
            pstmt = conn.prepareStatement(sql);
            pstmt.setInt(1,uid);
            rs = pstmt.executeQuery();
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        return rs;
    }
}
